package com.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * AccpBiz entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ACCP_BIZ", schema = "ACCP")
public class AccpBiz implements java.io.Serializable {

	// Fields

	private Integer bid;
	private String bname;
	private Set<AccpSubject> accpSubjects = new HashSet<AccpSubject>(0);
	private Set<AccpClass> accpClasses = new HashSet<AccpClass>(0);
	private Set<AccpTeacher> accpTeachers = new HashSet<AccpTeacher>(0);
	private Set<AccpGrade> accpGrades = new HashSet<AccpGrade>(0);

	// Constructors

	/** default constructor */
	public AccpBiz() {
	}

	/** minimal constructor */
	public AccpBiz(Integer bid) {
		this.bid = bid;
	}

	/** full constructor */
	public AccpBiz(Integer bid, String bname, Set<AccpSubject> accpSubjects,
			Set<AccpClass> accpClasses, Set<AccpTeacher> accpTeachers,
			Set<AccpGrade> accpGrades) {
		this.bid = bid;
		this.bname = bname;
		this.accpSubjects = accpSubjects;
		this.accpClasses = accpClasses;
		this.accpTeachers = accpTeachers;
		this.accpGrades = accpGrades;
	}

	// Property accessors
	@Id
	@Column(name = "BID", unique = true, nullable = false, precision = 8, scale = 0)
	public Integer getBid() {
		return this.bid;
	}

	public void setBid(Integer bid) {
		this.bid = bid;
	}

	@Column(name = "BNAME")
	public String getBname() {
		return this.bname;
	}

	public void setBname(String bname) {
		this.bname = bname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "accpBiz")
	public Set<AccpSubject> getAccpSubjects() {
		return this.accpSubjects;
	}

	public void setAccpSubjects(Set<AccpSubject> accpSubjects) {
		this.accpSubjects = accpSubjects;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "accpBiz")
	public Set<AccpClass> getAccpClasses() {
		return this.accpClasses;
	}

	public void setAccpClasses(Set<AccpClass> accpClasses) {
		this.accpClasses = accpClasses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "accpBiz")
	public Set<AccpTeacher> getAccpTeachers() {
		return this.accpTeachers;
	}

	public void setAccpTeachers(Set<AccpTeacher> accpTeachers) {
		this.accpTeachers = accpTeachers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "accpBiz")
	public Set<AccpGrade> getAccpGrades() {
		return this.accpGrades;
	}

	public void setAccpGrades(Set<AccpGrade> accpGrades) {
		this.accpGrades = accpGrades;
	}

}